package com.itheima.tanhua.dubbo.api;


import com.itheima.tanhua.dubbo.mappers.UserLoginMapper;
import com.itheima.tanhua.model.domain.User;
import com.itheima.tanhua.model.domain.bto.LoginReginfobto;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @author LENOVO
 */
@DubboService
public class UserLoginService implements IUseLoginSevice {




    @Autowired
    private UserLoginMapper userLoginMapper;


    @Override
    public User login(String phone) {
        return userLoginMapper.login(phone);
    }

    @Override
    public void addUser(User user) {

        userLoginMapper.addUser(user);
    }

    @Override
    public void addUserMsgPath(String url,Long id) {
userLoginMapper.addUserMsgFilePath(url,id);
    }

    @Override
    public void addUserMsg(LoginReginfobto loginReginfobto,String phone) {

        Long id = userLoginMapper.getId(phone);
        if ( userLoginMapper.tbuserinfoid(id)!=null){

        }
        loginReginfobto.setId(id);
        userLoginMapper.addUseMsg(loginReginfobto);

    }
}
